{include file="insurant_common/insurant_head"}
    <div class="wraper-box">
      <div class="container">
        <div class="main ovh">
          <div class="menu left">
            {include file="insurant_common/insurant_left"}
          </div>
          <div class="menu-content left">
            <div class="content-title">
              <p><span class="red name">填写相关资料</span></p>
            </div>
            <div class="step-box">
              <div class="active">设保留价</div>
              <div class="">看货信息</div>
              <div class="">提货信息</div>
              <div class="">收款信息</div>
              <div class="">递交委托书</div>
            </div>
            <div class="form-box">
              <div class="form-content">
                <div class="form-item">
                  <input type="hidden" value="{$info.i_id | default=''}" id="i_id">
                  <label style="width:165px">设定保留价（总价）：</label>
                  <input type="text" placeholder="请填写" name="save_price" value="{$info.save_price | default=''}" class="price" /> 万元
                </div>
                <div class="form-item">
                  <label style="width:165px">设定起拍价（总价）：</label>
                  <input type="text" placeholder="请填写" name="set_price" value="{$info.set_price | default=''}" class="price" /> 万元
                </div>
              </div>
              <div class="form-footer">
                <div class="step-btn-box">
                  <div class="save-btn" id="submit">下一步 </div>
                </div>
              </div> 
            </div>
          </div>
        </div>
      </div>
        {include file="common/footer"}
      <script src="/static/admin/layui/layui.js"></script>
      <script>
          layui.use(['layer'], function(){
              var layer = layui.layer;

              $('#submit').on('click',function(){
                  var i_id = $('#i_id').val();
                  var set_price = $('input[name="set_price"]').val();
                  var save_price = $('input[name="save_price"]').val();
                  if (set_price.length == 0) {
                      layer.msg('请填写设定保留价');
                      return;
                  }
                  if (save_price.length == 0) {
                      layer.msg('请填写设定起拍价');
                      return;
                  }
                  $.ajax({
                      url:'/pc/insurant/saveBolInfo',
                      type:'post',
                      dataType:'json',
                      data:{
                          'set_price':set_price,
                          'save_price':save_price,
                          'i_id':i_id,
                          'now_status':1,
                          'menu_id':2,
                      },
                      success:function (data) {
                          if(data.code ==200){
                              window.location.href = '/pc/insurant/step_2?i_id='+i_id+'&menu_id=2';
                          }else{
                              $.alert(data.msg);
                          }
                      }
                  });
              });


          });






      </script>